
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<link rel=stylesheet href='include/hoj.css' type='text/css'>
</head>
<body>
<center>
<div style="width:90%; text-align:left">
<img src="image/logo.png"/>
</div>
<table width=96%> 
	<tr align="center" class='hd' valign="top">
				<th><a href="faqs.php">F.A.Qs</a></th>
		<th><a href="./bbs.php">Web Board</a></th>
		<th><a href="./">Home</a></th>
		<th><a href="./problemset.html">ProblemSet</a></th>
		<th><a href="./status.php">Status</a></th>
		<th><a href="./ranklist.php">Ranklist</a></th>
		<th><a href="./contest.php">Contest</a></th>
		<th><a href=loginpage.php>Login</a></th><th><a href=registerpage.php>Register</a></th>	</tr>
</table>
</center>
<center>
<div class="notice">
	<div>
		<B>Notice:</B>鉴于种种原因，本OJ自下周星期一（3月5号）开始不再全面开放，请各位做好善后事宜，谢谢合作。	</div>
</div>
</center>
</div>
<title>Problem 2575. -- 外公的难题 -- 衡阳八中OJ离线版-2012-02-29</title><center><h2>2575: 外公的难题</h2><span class=green>Time Limit: </span>3 Sec&nbsp;&nbsp;<span class=green>Memory Limit: </span>128 MB<br><span class=green>Submit: </span>3&nbsp;&nbsp;<span class=green>Solved: </span>2<br>[<a href='submitpage.php?id=2575'>Submit</a>][<a href='problemstatus.php?id=2575'>Status</a>][<a href='bbs.php?id=2575'>Discuss</a>]</center><h2>Description</h2><div class=content><p><span class="Apple-style-span" style="word-spacing: 0px; font: medium Arial,Microsoft Yahei,Simsun,sans-serif; text-transform: none; color: rgb(0,0,0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; webkit-border-horizontal-spacing: 0px; webkit-border-vertical-spacing: 0px; webkit-text-decorations-in-effect: none; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><span class="Apple-style-span" style="font-size: 15px; line-height: 22px; font-family: 宋体">　　 Happy老爷爷的外孙Jacky能写会算，聪明绝顶，老爷爷非常喜欢他。Jacky最喜欢算24点了，可是因为他的知识还不够，他只会做加法，减法和乘法，另外也会使用括号。这次外公给他出了一道难题：从N张牌中任选若干张分成M墩( 每墩不超过5张牌)，使得每墩的各张牌都可以算出24点。这本来并不困难，但是外公又要求M的值最大，这可难坏了小Jacky。你愿意帮帮他吗？<span class="Apple-converted-space">&nbsp;</span><br />
</span></span></p></div><h2>Input</h2><div class=content><p><font size="3"><font face="宋体">共有两行，第一行包含一个数n(1&lt;=n&lt;=20),表示牌的张数。第二行有N个数依次为各张牌的点数，每个数为1~10的整数，以空格分开。<span class="Apple-converted-space">&nbsp;</span><br />
<br />
　<br />
　　</font></font></p></div><h2>Output</h2><div class=content><p><font size="3"><font face="宋体">仅有一个数为M的最大值．<span class="Apple-converted-space">&nbsp;</span></font></font></p></div><h2>Sample Input</h2>
			<div class=content><span class=sampledata>6<br />
1 2 3 4 5 6</span></div><h2>Sample Output</h2>
			<div class=content><span class=sampledata>2</span></div><h2>HINT</h2>
			<div class=content><p></p></div><h2>Source</h2>
			<div class=content><p><a href='problemset.html?search=曙光OI第四次比赛'>曙光OI第四次比赛</a></p></div><center>[<a href='submitpage.php?id=2575'>Submit</a>][<a href='problemstatus.php?id=2575'>Status</a>][<a href='bbs.php?id=2575'>Discuss</a>]</center>﻿<br>

<a href="./"><span class=red>HOME</span></a>
<a href="javascript:history.go(-1)"><span class=red>Back</span></a>

<hr>
<center>
	<div class="footer">
			<a href=setlang.php?lang=ko>한국어</a>&nbsp;
		<a href=setlang.php?lang=cn>中文</a>&nbsp;
		<a href=setlang.php?lang=fa>فارسی</a>&nbsp;
		<a href=setlang.php?lang=en>English</a>&nbsp;
		<a href=setlang.php?lang=th>ไทย</a>
	<br>		<div>版权所有 &copy;2008-2012 WaterPark Organization. | <script src="http://s21.cnzz.com/stat.php?id=2982771&web_id=2982771" language="JavaScript"></script>
</div>
		<div>Based on opensource project <a href="http://hustoj.googlecode.com">hustoj</a>.</div>
	</div>
</center>
</body>
</html>
